package com.study.lxy.springcloud.common.exception;

public class BusiException extends RuntimeException {

    private String code;

    public BusiException(String code,String message){
        super(message);
        this.code = code;
    }

    public BusiException(ErrorMsg errorMsg){
        super(errorMsg.getMessage());
        this.code = errorMsg.getCode();
    }

    public BusiException(ErrorMsg errorMsg,String message){
        super(message);
        this.code = errorMsg.getCode();
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
